package com.tgky.ybzb.utils;


import java.io.*;

public class ExecuteUtil {

    public static void main(String[] args) {

//        executeBat("algbat/IonTomo.bat");


        executeBat("python alg\\linuxWindows_ionoUP\\linuxWindows_whntec2ipptec\\whntec2ipptec.py");

    }


    public static void executeBat(String batPath) {
        Runtime rt = Runtime.getRuntime();
        try {
            Process pr = rt.exec(batPath); // 执行一个cmd命令
            BufferedReader br = new BufferedReader(new InputStreamReader(pr.getInputStream(), "GBK"));
            String s;
            while ((s = br.readLine()) != null) {
                System.out.println(s);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }


}
